from selenium.webdriver.common.by import By
from Base.Base import Base

class Page(Base):
    #侧边栏
    cebian_loc = (By.XPATH,'/html/body/div[1]/div/section/aside/ul/li/div')
    def cebian(self):
        self.click(self.cebian_loc)

    #登录页面
    login_loc = (By.XPATH,'/html/body/div[1]/div/section/aside/ul/li/ul/li[14]/a')
    def login(self):
        self.click(self.login_loc)

    #用户名
    user_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[1]/div/input')
    def user(self,name):
        self.send_keys(self.user_loc,name)

    #密码
    pwd_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[2]/div/input')
    def pwd(self,pwd):
        self.send_keys(self.pwd_loc,pwd)

    #点击登录
    loginbtn_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div[2]/button[2]/span')
    def loginbtn(self):
        self.click(self.loginbtn_loc)

    #确定
    queding_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[2]/div/div/div/div[2]/button[2]/span')
    def queding(self):
        self.click(self.queding_loc)



